package com.ms.game.bank.db;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.ms.game.bank.CashChangeWay;
import com.xpec.c4.db.model.log.basic.BasicTransactionLogModel;

@Entity
@Table(name="cash_point_log")
@org.hibernate.annotations.Table(
		appliesTo = "cash_point_log", indexes = {
				@org.hibernate.annotations.Index(name = "IDX_PURCHAS_ID", columnNames = { "purchasId" }),
				@org.hibernate.annotations.Index(name = "IDX_EVENT_TIME", columnNames = { "eventTime", "accountId","playerName"}),
				@org.hibernate.annotations.Index(name = "IDX_DETAIL", columnNames = { "accountId", "gameTime"}),
		})
public class CashLogModel extends BasicTransactionLogModel {

	private static final long serialVersionUID = -7282103529966920135L;
	
	/** account guid */
	private String accountId;

	/** player guid */
	private String playerId;

	/** player name */
	private String playerName;

	/** 點數異動後數值 */
	private long cashAfterChange;
	
	/** 點數異動數值 */
	private long cashChangeValue;

	/** 點數異動前數值 */
	private long cashBeforeChange;

	/** 金幣異動後數值 */
	private BigDecimal goldAfterChange;

	/** 金幣異動數值 */
	private BigDecimal goldChangeValue;

	/** 金幣異動前數值 */
	private BigDecimal goldBeforeChange;

	/** 紅利點數異動後數值 */
	private BigDecimal bonusAfterChange;
	
	/** 紅利點數異動數值 */
	private BigDecimal bonusChangeValue;
	
	/** 紅利點數異動錢數值 */
	private BigDecimal bonusBeforeChange;

	/** 行為id {@link CashChangeWay} */
	private int changeWay;

	/** 行為說明 */
	private String changeWayDesc;

	/** 營運商交易序號  */
	private String purchasId;

	/** 產包或活動名稱  */
	private String giftTitle;
	
	/** 營運商遊戲帳號  */
	private String openId;

	
	
	public String getAccountId() {
		return accountId;
	}

	public String getPlayerId() {
		return playerId;
	}

	public String getPlayerName() {
		return playerName;
	}

	public long getCashChangeValue() {
		return cashChangeValue;
	}

	public long getCashBeforeChange() {
		return cashBeforeChange;
	}

	public long getCashAfterChange() {
		return cashAfterChange;
	}
	
	@Column(precision = 19, scale = 2 , columnDefinition="DECIMAL(19,2) default 0.0")
	public BigDecimal getGoldAfterChange() {
		return goldAfterChange;
	}
	
	@Column(precision = 19, scale = 2 , columnDefinition="DECIMAL(19,2) default 0.0")
	public BigDecimal getGoldChangeValue() {
		return goldChangeValue;
	}
	
	@Column(precision = 19, scale = 2 , columnDefinition="DECIMAL(19,2) default 0.0")
	public BigDecimal getGoldBeforeChange() {
		return goldBeforeChange;
	}
	
	@Column(precision = 19, scale = 2 , columnDefinition="DECIMAL(19,2) default 0.0")
	public BigDecimal getBonusAfterChange() {
		return bonusAfterChange;
	}
	
	@Column(precision = 19, scale = 2 , columnDefinition="DECIMAL(19,2) default 0.0")
	public BigDecimal getBonusChangeValue() {
		return bonusChangeValue;
	}
	
	@Column(precision = 19, scale = 2 , columnDefinition="DECIMAL(19,2) default 0.0")
	public BigDecimal getBonusBeforeChange() {
		return bonusBeforeChange;
	}

	public int getChangeWay() {
		return changeWay;
	}

	public String getChangeWayDesc() {
		return changeWayDesc;
	}

	public void setAccountId(String accountId) {
		this.accountId = accountId;
	}

	public void setPlayerId(String playerId) {
		this.playerId = playerId;
	}

	public void setPlayerName(String playerName) {
		this.playerName = playerName;
	}

	public void setCashChangeValue(long cashChangeValue) {
		this.cashChangeValue = cashChangeValue;
	}

	public void setCashBeforeChange(long cashBeforeChange) {
		this.cashBeforeChange = cashBeforeChange;
	}

	public void setCashAfterChange(long cashAfterChange) {
		this.cashAfterChange = cashAfterChange;
	}
	
	public void setGoldBeforeChange(BigDecimal goldBeforeChange) {
		this.goldBeforeChange = goldBeforeChange;
	}

	public void setGoldChangeValue(BigDecimal goldChangeValue) {
		this.goldChangeValue = goldChangeValue;
	}
	
	public void setGoldAfterChange(BigDecimal goldAfterChange) {
		this.goldAfterChange = goldAfterChange;
	}

	public void setBonusAfterChange(BigDecimal bonusAfterChange) {
		this.bonusAfterChange = bonusAfterChange;
	}

	public void setBonusChangeValue(BigDecimal bonusChangeValue) {
		this.bonusChangeValue = bonusChangeValue;
	}

	public void setBonusBeforeChange(BigDecimal bonusBeforeChange) {
		this.bonusBeforeChange = bonusBeforeChange;
	}
	
	public void setChangeWay(int changeWay) {
		this.changeWay = changeWay;
	}

	public void setChangeWayDesc(String changeWayDesc) {
		this.changeWayDesc = changeWayDesc;
	}
	
	public String getPurchasId() {
		return purchasId;
	}

	public void setPurchasId(String purchasId) {
		this.purchasId = purchasId;
	}

	public String getGiftTitle() {
		return giftTitle;
	}

	public void setGiftTitle(String giftTitle) {
		this.giftTitle = giftTitle;
	}

	public String getOpenId() {
		return openId;
	}

	public void setOpenId(String openId) {
		this.openId = openId;
	}
	
}
